import React, { Component } from 'react';

import Navbar from './Navbar';
import Sidebar from './Sidebar';

interface IProps {}

interface IState {
  isShow: boolean;
}

export default class App extends Component<IProps, IState> {
  state = {
    isShow: true,
  };
  render() {
    return (
      <div>
        <h1>App</h1>

        <Navbar
          title="首页"
          cb={() => {
            this.setState({
              isShow: !this.state.isShow,
            });
          }}
        />
        {this.state.isShow && <Sidebar />}
      </div>
    );
  }
}
